package com.webull.information.center.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webull.information.center.dao.InfoNewsLabelRelDao;
import com.webull.information.client.model.NewsLabelRel;
import com.webull.information.client.service.InfoNewsLabelRelService;

/**
 * 新闻-标签 关系接口 实现.
 *
 * @author longyang
 * @date 2016年6月27日 下午8:10:45
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class InfoNewsLabelRelServiceImpl implements InfoNewsLabelRelService {

	private @Autowired InfoNewsLabelRelDao infoNewsLabelRelDao;

	@Override
	public Integer add(NewsLabelRel labelRel) {
		return infoNewsLabelRelDao.add(labelRel);
	}

	@Override
	public Integer delNewsLabelRel(Integer... relIds) {
		return infoNewsLabelRelDao.del(relIds);
	}

	@Override
	public Integer delByNewsId(Long newsId) {
		return infoNewsLabelRelDao.delByNewsId(newsId);
	}

	@Override
	public List<NewsLabelRel> search(Long newsId) {
		return infoNewsLabelRelDao.searchByNewsId(newsId);
	}

}
